package com.orm;

import javax.persistence.*;
import javax.persistence.Entity;

/**
 * Created by lirance on 16/5/25.
 */
@Entity
@Table(name = "resultSave", schema = "", catalog = "ServiceRecommendationSystem")
public class ResultSaveEntity {
    private Integer clusteNum;
    private Double lmd;
    private Integer gNum;
    private Integer k;
    private Double mae;
    private String rmse;

    @Basic
    @Column(name = "clusteNum", nullable = true, insertable = true, updatable = true)
    public Integer getClusteNum() {
        return clusteNum;
    }

    public void setClusteNum(Integer clusteNum) {
        this.clusteNum = clusteNum;
    }

    @Basic
    @Column(name = "lmd", nullable = true, insertable = true, updatable = true, precision = 0)
    public Double getLmd() {
        return lmd;
    }

    public void setLmd(Double lmd) {
        this.lmd = lmd;
    }

    @Basic
    @Column(name = "gNum", nullable = true, insertable = true, updatable = true)
    public Integer getgNum() {
        return gNum;
    }

    public void setgNum(Integer gNum) {
        this.gNum = gNum;
    }

    @Basic
    @Column(name = "k", nullable = true, insertable = true, updatable = true)
    public Integer getK() {
        return k;
    }

    public void setK(Integer k) {
        this.k = k;
    }

    @Basic
    @Column(name = "mae", nullable = true, insertable = true, updatable = true, precision = 0)
    public Double getMae() {
        return mae;
    }

    public void setMae(Double mae) {
        this.mae = mae;
    }

    @Basic
    @Column(name = "rmse", nullable = true, insertable = true, updatable = true, length = 11)
    public String getRmse() {
        return rmse;
    }

    public void setRmse(String rmse) {
        this.rmse = rmse;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ResultSaveEntity that = (ResultSaveEntity) o;

        if (clusteNum != null ? !clusteNum.equals(that.clusteNum) : that.clusteNum != null) return false;
        if (lmd != null ? !lmd.equals(that.lmd) : that.lmd != null) return false;
        if (gNum != null ? !gNum.equals(that.gNum) : that.gNum != null) return false;
        if (k != null ? !k.equals(that.k) : that.k != null) return false;
        if (mae != null ? !mae.equals(that.mae) : that.mae != null) return false;
        if (rmse != null ? !rmse.equals(that.rmse) : that.rmse != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = clusteNum != null ? clusteNum.hashCode() : 0;
        result = 31 * result + (lmd != null ? lmd.hashCode() : 0);
        result = 31 * result + (gNum != null ? gNum.hashCode() : 0);
        result = 31 * result + (k != null ? k.hashCode() : 0);
        result = 31 * result + (mae != null ? mae.hashCode() : 0);
        result = 31 * result + (rmse != null ? rmse.hashCode() : 0);
        return result;
    }
}
